/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package myproj;

import java.awt.BorderLayout;
import java.awt.Color;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JProgressBar;

/**
 *
 * @author Administrator
 */
public class Starter{
    private JLabel imglLabel=new JLabel(new javax.swing.ImageIcon(getClass().getResource(java.util.ResourceBundle.getBundle("myproj/globalizefile").getString("/MYPROJ/STARTER_1.PNG"))));
    private JLabel infoLabel=new JLabel(java.util.ResourceBundle.getBundle("myproj/globalizefile").getString("程序正在进行文件载入："));
    private JProgressBar progressBar=new JProgressBar();
    private JFrame frame=new JFrame();
    public Starter(){
        frame.setSize(466, 300);
        frame.setUndecorated(true);
        imglLabel.setSize(480,370);
        imglLabel.setText(java.util.ResourceBundle.getBundle("myproj/globalizefile").getString("           "));
        frame.add(imglLabel, BorderLayout.NORTH);
        infoLabel.setFont(new java.awt.Font("微软雅黑", 1, 14)); // NOI18N
        infoLabel.setForeground(new java.awt.Color(153, 0, 0));
        infoLabel.setHorizontalTextPosition(JLabel.HORIZONTAL);
        infoLabel.setBackground(new java.awt.Color(153, 123, 0));
        infoLabel.setSize(480, 20);
        infoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource(java.util.ResourceBundle.getBundle("myproj/globalizefile").getString("/MYPROJ/STARTER_R1.PNG"))));
        frame.add(infoLabel,BorderLayout.CENTER);
        frame.add(progressBar,BorderLayout.SOUTH);
        frame.setLocationRelativeTo(null);
        frame.setResizable(false);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
        
    }
    public void updateStarter(int progress,String info){
        progressBar.setValue(progress);
        infoLabel.setText(info);
        if(progress==100){
            frame.dispose();
        }
    }
}
